import Vue from 'vue'
import App from './App.vue'
import router from './router'
import requestMy from './utils/requestMy'
Vue.config.productionTip = false 
Vue.prototype.requestMy = requestMy

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);


import moment from 'moment'
// Object.defineProperty(Vue.prototype, '$moment', { value: moment })
//  全局过滤器 时间戳 
Vue.filter('dateformat', function (dataStr, pattern = 'YYYY-MM-DD') {
  if (dataStr) {
    return moment(dataStr).format(pattern)
  } else {
    return dataStr
  }
})

new Vue({
	el: '#app',
  router,
  render: h => h(App)
}).$mount('#app')
